The Prisoners' Hats Riddle And Solution